package com.zh.boot05web01.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

/**
 * @Author: zhanghuan
 * @date: 2022/9/19 21:09
 * @description: create it
 */
@RestController
public class SessionTestController {

    @GetMapping("/session")
    public String setSession(HttpSession session) {

        session.setAttribute("msg", "success");
        return "forward:/to/session";

    }


}
